<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: relative;
            width: 1200px;
            margin: auto;
        }
        
        .close-btn {
            position: absolute;
            top: 5px;
            right: 10px;
            cursor: pointer;
            font-weight: 700;
            font-size: 24px;
            color: #fff;
            background: #2d2d2d;
            width: 20px;
            height: 20px;
            text-align: center;
            line-height: 20px;
            opacity: .3;
            font-style: normal;
        }
    </style>
</head>

<body>
    <div class="box">
        <img src="images/jd.webp" alt="">
        <i class="close-btn">×</i>
    </div>
    <script>
        var box = document.querySelector('.box');
        var btn = document.querySelector('.close-btn');
        btn.onclick = function() {
            box.style.display = 'none';
        }
    </script>
</body>

</html>